﻿using BCCommon.Enums;
using BCEntity.Common.UserBankCard;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCData.Common.UserBankCard
{
    public interface IUserBankCardData
    {
        /// <summary>
        /// 创建一条用户银行卡信息
        /// </summary>
        /// <param name="userBankCardEntity">用户银行卡信息</param>
        /// <returns></returns>
        UserBankCardEntity Create(UserBankCardEntity userBankCardEntity);

        /// <summary>
        /// 修改一条用户银行卡信息
        /// </summary>
        /// <param name="userBankCardEntity">用户银行卡信息</param>
        /// <returns></returns>
        UserBankCardEntity Update(UserBankCardEntity userBankCardEntity);

        /// <summary>
        /// 根据银行卡Id检查是否存在银行卡信息
        /// </summary>
        /// <param name="userBankCardId">银行卡Id</param>
        /// <returns></returns>
        bool ExistsByBankCardId(long userBankCardId);

        /// <summary>
        /// 根据银行卡编码检查是否存在银行卡信息
        /// </summary>
        /// <param name="bankCardNo">银行卡编码</param>
        /// <returns></returns>
        bool ExistsByBankCardNo(string bankCardNo);

        /// <summary>
        /// 删除一条用户银行卡信息
        /// </summary>
        /// <param name="userBankCardId"></param>
        /// <returns></returns>
        int Delete(long userBankCardId);

        /// <summary>
        /// 获取一条用户银行卡信息
        /// </summary>
        /// <param name="userBankCardId">用户银行卡Id</param>
        /// <returns></returns>
        UserBankCardEntity Get(long userBankCardId);

        /// <summary>
        /// 用户银行卡列表
        /// </summary>
        /// <param name="userName">姓名</param>
        /// <param name="phone">手机号</param>
        /// <param name="identityCardNo">身份证号</param>
        /// <param name="bankCardNo">银行卡号</param> 
        /// <param name="ascending">排序</param>  
        /// <param name="pageIndex">分页页码</param>
        /// <param name="pageSize">分页大小</param>
        /// <param name="dataCount">数据总数</param>     
        /// <param name="userId">用户Id</param>
        /// <param name="walletId">钱包Id</param>
        /// <returns></returns>
        IEnumerable<UserBankCardEntity> List(string userName,string phone,string identityCardNo, string bankCardNo, bool? ascending, int pageIndex, int pageSize, out int dataCount, long? userId, long? walletId);

        /// <summary>
        /// 用户银行卡实名认证
        /// </summary>
        /// <param name="userBankCardId">用户银行卡Id</param>
        /// <param name="realnameValidationTime">认证通过时间</param>
        /// <returns></returns>
        int RealNameValidation(long userBankCardId,DateTime realnameValidationTime);

        
    }
}
